#ifndef PHP_PUSHGATEWAY_H
# define PHP_PUSHGATEWAY_H

#include "php.h"
#include "php_ini.h"
#include "main/SAPI.h"
#include "zend_API.h"
#include "zend_interfaces.h"
#include "zend_types.h"

#include "ext/standard/info.h"
#include "ext/standard/url.h"

#include <curl/curl.h>
#include <map>

extern zend_module_entry pushgateway_module_entry;
# define phpext_pushgateway_ptr &pushgateway_module_entry

# define PHP_PUSHGATEWAY_VERSION "0.1.0"

#ifdef ZTS
#include "TSRM.h"
#endif

ZEND_BEGIN_MODULE_GLOBALS(pushgateway)
    zend_bool debug;
    zend_bool enable;
    int interval;
    int timeout;
    int connecttimeout;
    char *basedir;
    char *host;
    char *bucket;
    char *output;
ZEND_END_MODULE_GLOBALS(pushgateway)

extern ZEND_DECLARE_MODULE_GLOBALS(pushgateway);

#ifdef ZTS
#define PUSHGATEWAY_G(v) TSRMG(pushgateway_globals_id, zend_pushgateway_globals *, v)
#else
#define  PUSHGATEWAY_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(pushgateway, v)
#endif

# if defined(ZTS) && defined(COMPILE_DL_PUSHGATEWAY)
ZEND_TSRMLS_CACHE_EXTERN()
# endif

#endif	/* PHP_PUSHGATEWAY_H */

